package com.nit.lab.dto;

import com.nit.lab.model.SysUserEntity;

/**
 * Created by CYT on 2017/11/19.
 */
public class DtoLoginUser {
    private Integer userId;
    private String userPicUrl;
    private String userName;
    private String userRealName;
    private String userPhone;
    private String userEmail;
    private String userCode;
    private String userSchool;
    private Integer actorId;
    //用户角色id
    private Integer isDelete;
    //是否删除

    public DtoLoginUser() {
    }

    public DtoLoginUser(Integer userId, String userName, String userRealName, String userPhone, String userCode, Integer actorId) {
        this.userId = userId;
        this.userName = userName;
        this.userRealName = userRealName;
        this.userPhone = userPhone;
        this.userCode = userCode;
        this.actorId = actorId;
    }

    public DtoLoginUser(Integer userId, Integer actorId) {
        this.userId = userId;
        this.actorId = actorId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getActorId() {
        return actorId;
    }

    public void setActorId(Integer actorId) {
        this.actorId = actorId;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public String getUserPicUrl() {
        return userPicUrl;
    }

    public void setUserPicUrl(String userPicUrl) {
        this.userPicUrl = userPicUrl;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserRealName() {
        return userRealName;
    }

    public void setUserRealName(String userRealName) {
        this.userRealName = userRealName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserSchool() {
        return userSchool;
    }

    public void setUserSchool(String userSchool) {
        this.userSchool = userSchool;
    }

    public SysUserEntity toBEAN() {
        SysUserEntity sysUserEntity = new SysUserEntity();
        sysUserEntity.setUserPicUrl(userPicUrl);
        sysUserEntity.setUserName(userName);
        sysUserEntity.setUserRealName(userRealName);
        sysUserEntity.setUserPhone(userPhone);
        sysUserEntity.setUserEmail(userEmail);
        sysUserEntity.setUserCode(userCode);
        sysUserEntity.setUserSchool(userSchool);
        sysUserEntity.setActorId(3);
        //ActorId默认为3:用户。
        sysUserEntity.setIsDelete(0);

        return sysUserEntity;
    }
}
